import request from "../utils/request"

const getSildeshowApi = {
    // 获取所有轮播图
    getAllSwiper(params){
        return request({
            url:"/admin/getAllSwiper",
            method:"GET",
            params,
            headers:{ 'Authorization': window.localStorage.getItem("token") }
            // headers: { 'ContentType': 'application/json' }
        })
    },
    // 轮播图文件上传
    getfileUpload(params){
        return request({
            url:"/admin/fileUpload",
            method:"POST",
            data:params,
            headers:{ 'Authorization': window.localStorage.getItem("token") }
            // headers: { 'ContentType': 'application/json' }
        })
    },
    // 轮播图删除上传文件
    getdeleteFiles(params){
        return request({
            url:"/admin/deleteFiles",
            method:"POST",
            data:params,
            headers:{ 'Authorization': window.localStorage.getItem("token") }
            // headers: { 'ContentType': 'application/json' }
        })
    },
    // 添加轮播图
    getaddSwiper(params){
        return request({
            url:"/admin/addSwiper",
            method:"POST",
            data:params,
            headers:{ 'Authorization': window.localStorage.getItem("token") }
            // headers: { 'ContentType': 'application/json' }
        })
    },
    // 轮播图上下架
    getupdateSwiperShow(params){
        return request({
            url:"/admin/updateSwiperShow",
            method:"POST",
            data:params,
            headers:{ 'Authorization': window.localStorage.getItem("token") }
            // headers: { 'ContentType': 'application/json' }
        })
    },
    // 删除轮播图
    getdeleteSwiper(params){
        return request({
            url:"/admin/deleteSwiper",
            method:"GET",
            params,
            headers:{ 'Authorization': window.localStorage.getItem("token") }
            // headers: { 'ContentType': 'application/json' }
        })
    },
    // 修改轮播图
    getupdateSwiper(params){
        return request({
            url:"/admin/updateSwiper",
            method:"POST",
            data:params,
            headers:{ 'Authorization': window.localStorage.getItem("token") }
            // headers: { 'ContentType': 'application/json' }
        })
    },
    // 根据编号查询轮播图
    getfindById(params){
        return request({
            url:"/admin/findByIdSwiper",
            method:"GET",
            params,
            headers:{ 'Authorization': window.localStorage.getItem("token") }
            // headers: { 'ContentType': 'application/json' }
        })
    },
}

export default getSildeshowApi;